package com.spzx.product.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.spzx.product.domain.Brand;
import com.spzx.product.service.BrandService;
import com.spzx.product.mapper.BrandMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author lingx
 * @description 针对表【brand(分类品牌)】的数据库操作Service实现
 * @createDate 2024-09-20 09:27:34
 */
@Service
public class BrandServiceImpl extends ServiceImpl<BrandMapper, Brand>
        implements BrandService {

    @Autowired
    private BrandMapper brandMapper;

    //查询品牌列表
    @Override
    public List<Brand> getPageList(Brand brand) {
        return brandMapper.selectPageList(brand);
    }

    //修改品牌
    @Override
    public boolean updateBrand(Brand brand) {
        System.out.println(brand.toString());
        return brandMapper.updateBrand(brand);
    }

    //删除品牌
    @Override
    public int deleteBrandByIds(Long[] ids) {
        return brandMapper.deleteByIds(ids);
    }
}




